package com.rockcent.mall.lib.domain;

import com.rockcent.common.domain.IDEntityMall;
import com.rockcent.mall.lib.domain.enumclass.SystemType;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;

/**
 * Created by oyhk on 2017/3/9.
 *
 * 系统用户 职称
 */
@Entity
@Table(name = "auth_title")
@DynamicInsert
@DynamicUpdate
public class AuthTitle extends IDEntityMall {

    @Column(columnDefinition = "varchar(50) comment '名称'")
    private String name;

    @Column(columnDefinition = "varchar(50) comment '系统类型 ADMIN(\"R端\"),MALL(\"M端\"),MERCHANT(\"B端\")'")
    @Enumerated(EnumType.STRING)
    private SystemType systemType;

    @Column(columnDefinition = "bigint comment '拥有者ID'")
    private Long ownerId;


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public SystemType getSystemType() {
        return systemType;
    }

    public void setSystemType(SystemType systemType) {
        this.systemType = systemType;
    }

    public Long getOwnerId() {
        return ownerId;
    }

    public void setOwnerId(Long ownerId) {
        this.ownerId = ownerId;
    }

    @Override
    public String toString() {
        return "AuthTitle{" +
                "name='" + name + '\'' +
                ", systemType=" + systemType +
                ", ownerId=" + ownerId +
                '}';
    }
}
